#include <unistd.h>

#include "McuRPCManager.h"
#include <log/log.h>

using namespace android;

class MyRPCHandler: public McuRPCHandler {
public:
    int process(McuRPCBuffer *buf);
};

int MyRPCHandler::process(McuRPCBuffer *buf) {

    ALOGE("MyRPCHandler, processs, buf size %d\n", buf -> getSize());


    return buf->getSize();
}

int main(int argc, char**argv) {

    MyRPCHandler* handler = new MyRPCHandler();
    McuRPCManager* manager = android::McuRPCManager::getInstance();
    manager -> registerSpiRPCHandler(handler);


    manager -> startSpiInput();

    while(1) {
        sleep(100);
    }


    return 0;
}
